# Get affordability for the accounts shared for a consent. (deprecated)

Maximum of 12 months returned

Endpoint: GET /affordability/v1/consents/{consentId}
Version: all
Security: Bearer

## Path parameters:

  - `consentId` (string, required)
    The consent ID to fetch the affordability results for

## Query parameters:

  - `includeFlexibleCosts` (boolean)
    Includes the flags used to calculate the confidence score

## Response 200 fields (application/json):

  - `accountDetails` (object)

  - `accountDetails.accountId` (string,null)
    Unique identifier for the account at the institution

  - `accountDetails.bankCode` (string,null)
    The national bank transit or transfer code used for identification of the bank assigned
by a central bank in a country, eg: A Routing number(US/CA) or Sort code(UK)

  - `accountDetails.accountNumber` (string,null)
    The bank’s unique identifier for the account

  - `accountDetails.accountType` (string)
    Enum: "Business", "Personal"

  - `accountDetails.accountSubType` (string)
    Enum: "ChargeCard", "CreditCard", "CurrentAccount", "Emoney", "Loan", "Mortgage", "PrepaidCard", "Savings"

  - `accountDetails.currencyCode` (string,null)
    ISO4217 currency code for the account

  - `accountDetails.accountHolderNames` (string,null)
    The AccountHolderNames is the name or names of the account owner(s) represented at an account level.

  - `accountDetails.customerReference` (string,null)
    The reference that is passed by the customer

  - `accountDetails.parties` (array,null)

  - `accountDetails.parties.accountHolderName` (string,null)
    Name by which a specific party is known and which is usually used to identify that party.

  - `accountDetails.parties.isIndividual` (boolean,null)
    Indicates the party is an individual and not a business.

  - `accountDetails.parties.isAuthorizingParty` (boolean,null)
    Indicates the party authorized the connection on behalf of a joint or business account.

  - `accountDetails.parties.partyType` (string)
    Party type, in a coded form.
    Enum: "Delegate", "Joint", "Sole"

  - `affordabilityMonths` (array,null)
    List of Month Affordability

  - `affordabilityMonths.month` (integer)

  - `affordabilityMonths.year` (integer)

  - `affordabilityMonths.monthDateTime` (string)

  - `affordabilityMonths.calculatedIncome` (number)
    Estimated income value derived from Income Verification process, used for calculating affordability.

This value will be the same for all months, as opposed to [DirectID.Data.API.Models.Affordability.Response.MonthAffordability.IncomeForMonth] that tracks actual
income recorded for a given month.

  - `affordabilityMonths.affordability` (number)
    Affordability value calculated by subtracting expenditure from [DirectID.Data.API.Models.Affordability.Response.MonthAffordability.CalculatedIncome].

As it's based on [DirectID.Data.API.Models.Affordability.Response.MonthAffordability.CalculatedIncome] which has the same value for all months, this doesn't
reflect the reality of affordability for the given month, but we use it for calculating the top level
aggregate value [DirectID.Data.API.Models.Affordability.Response.AffordabilityResponse] and sensible
to record it so that we can later reference / confirm the top level aggregate is being calculated correctly.

  - `affordabilityMonths.incomeForMonth` (number,null)
    Income recorded from all identified income sources for the given month

  - `affordabilityMonths.affordabilityForMonth` (number,null)
    Affordability value calculated by subtracting expenditure from [DirectID.Data.API.Models.Affordability.Response.MonthAffordability.IncomeForMonth]

  - `affordabilityMonths.fixedCosts` (number)

  - `affordabilityMonths.flexibleCosts` (number)

  - `affordabilityMonths.debtFees` (number)

  - `estimatedCalculatedIncome` (number)
    Calculated Income Estimate

  - `estimatedFixedCosts` (number)
    Calculated Fixed Cost Estimate

  - `estimatedFlexibleCosts` (number)
    Calculated Flexible Costs Estimate

  - `estimatedDebtFees` (number)
    Calculated Debt Fees Estimate

  - `estimatedAffordability` (number)
    Calculated Affordability Estimate

## Response 400 fields (application/json):

  - `code` (string,null)
    Error code.

  - `description` (string,null)
    Error message.

  - `details` (string,null)
    Error details.

  - `correlationId` (string,null)
    User transaction tracking Id


## Response 401 fields
